<template>


  <div ref="vantaRef" style="background: linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)), linear-gradient(135deg, #e9f1ff -1%, #f1e9ff 100%);
  min-height: 100%;
  position: relative;
  display: block ">
    <div
    class="nav-bar"
    >
      <el-image class="nav-logo" @click="backOsredm" :src="osredmLogo" />
      <a class="nav-f" href="https://www.osredm.com/" >首页</a>
      <a class="nav-s" href="https://www.osredm.com/explore/all" >开源项目</a>
      <a class="nav-s" href="https://www.osredm.com/task" >创客空间</a>
      <a class="nav-s" href="https://fc.osredm.com/competitions" >开放竞赛</a>
      <a class="nav-s" href="https://fc.osredm.com/forums" >论坛交流</a>
    </div>
    <div  class="container" >
<!--      <div class="banner-main" :style="{backgroundImage:'url('+require('../assets/new-banner.svg')+')'}" style=" background-size:cover; ">-->

      <div class="banner-main">
        <div class="banner-word">
<!--          <img src="../assets/hskylogo.png" style="height: 60px">-->
          <p class="animate__animated animate__fadeInUp banner-f" >红山开源工具集</p>
          <p class="animate__animated animate__fadeInUp banner-s" >轻量级、好用工具等你体验</p>



          <!--标签快速跳转-->
          <div class="div-jump">
            <el-button round v-scroll-to="'#onlineTools'" class="button-jump">在线工具</el-button>
            <el-button round v-scroll-to="'#lmTools'" class="button-jump">大模型工具集</el-button>
            <el-button round v-scroll-to="'#opensourceModel'" class="button-jump">开源基座模型</el-button>
            <el-button round v-scroll-to="'#devtools'" class="button-jump">开发工具套件</el-button>

          </div>
          <form @submit.prevent="handleSearch"  class="search-fm">
            <input type="text" id="search-text" class="search-input"  placeholder="搜索" style="outline:0"
                   autocomplete="off" data-status="true" v-model="searchInput" >
            <button type="submit" id="btn_search">
              <svg t="1741594269608" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2869"
                   width="28" height="28"><path d="M708.32 465.44a256 256 0 0 0-252.64-259.84 256 256 0 0 0-252.64 259.84 256 256 0 0 0 252.64 259.68 256 256 0 0 0 252.64-259.68z m125.92 440.48l-153.92-157.92-1.12-1.76a345.92 345.92 0 0 1-224 81.92C260.48 828.16 102.4 665.6 102.4 465.44S260.48 102.4 455.68 102.4s353.28 162.56 353.28 363.04a368 368 0 0 1-61.44 204.32l4.96 4.16L906.4 832a53.92 53.92 0 0 1 0 74.08 50.72 50.72 0 0 1-71.68 0z" p-id="2870" fill="#ddcdff"></path></svg>
            </button>
          </form>


        </div>
      </div>


      <div id="onlineTools" class="animate__animated animate__fadeInUp main-card">

        <div class="card-border">
          <el-card shadow="never"  >

              <p class="tools-title">在线工具</p>


            <div style="text-align: left; display: flex; flex-wrap: wrap  ">
              <div class="tools-card"  @click="openUtilsPage('/cssTools')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/CSS3.svg" alt=""/>
                <div>
                  <p class="tools-text">CSS格式化工具</p>
                  <p class="tools-text1">用于对压缩/编译过的CSS代码进行格式化解析</p>
                </div>


              </div>

              <div class="tools-card"  @click="openUtilsPage('/JsonTools')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/json.svg" alt=""/>

                <div>
                  <p class="tools-text">JSON格式化工具</p>
                  <p class="tools-text1">用于对未经格式化的json进行格式化解析</p>
                </div>
              </div>

              <div class="tools-card"  @click="openUtilsPage('/xmlTools')">


                <img style="margin-left:15px; height: 60px" src="../assets/icon/xml.svg" alt=""/>

                <div>
                  <p class="tools-text">XML格式化工具</p>
                  <p class="tools-text1">对未经格式化的XML文档进行解析</p>
                </div>
              </div>

              <div class="tools-card"  @click="openUtilsPage('/uuidTools')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/UUID.svg" alt=""/>

                <div>
                  <p class="tools-text">UUID生成器</p>
                  <p class="tools-text1">用于生成UUID V1/V4字符串</p>
                </div>
              </div>
              <div class="tools-card"  @click="openUtilsPage('/encryptionTool')">

                <img style="margin-left:15px;height: 60px" src="../assets/icon/encryption.svg" alt=""/>
                <div>
                  <p class="tools-text">加密/解密工具</p>
                  <p class="tools-text1">使用AES对任意字符进行加密</p>
                </div>
              </div>


            </div>

          </el-card>


        </div>











      </div>

      <!--在线工具导航-->
      <div id="lmTools" class="animate__animated animate__fadeInUp main-card">

        <div class="card-border">
          <el-card shadow="never"  >

            <p class="tools-title">大模型工具集</p>


            <p class="tools-des">对话聊天类（点击即用）</p>

            <div style="text-align: left; display: flex; flex-wrap: wrap  ">
              <div class="tools-card"  @click="openWebPage('https://chat.deepseek.com/')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/deepseek-chat-icon.png" alt=""/>
                <div>
                  <p class="tools-text">DeepSeek</p>
                  <p class="tools-text1">深度求索推出的开源大模型和聊天助手</p>
                </div>


              </div>

              <div class="tools-card"  @click="openWebPage('https://www.doubao.com/')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/doubao-icon.png" alt=""/>

                <div>
                  <p class="tools-text">豆包</p>
                  <p class="tools-text1">字节跳动旗下的智能AI助手</p>
                </div>
              </div>

              <div class="tools-card"  @click="openWebPage('https://kimi.moonshot.cn/')">


                <img style="margin-left:15px; height: 60px; border-radius: 30px;" src="../assets/icon/kimi-ai-logo.png" alt=""/>

                <div>
                  <p class="tools-text">Kimi</p>
                  <p class="tools-text1">由月之暗面推出的智能助手</p>
                </div>
              </div>

              <div class="tools-card"  @click="openWebPage('https://yuanbao.tencent.com/')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/tencent-yuanbao-icon.png" alt=""/>

                <div>
                  <p class="tools-text">腾讯元宝</p>
                  <p class="tools-text1">腾讯推出的智能助手，已经接入DeepSeek</p>
                </div>
              </div>


              <div class="tools-card"  @click="openWebPage('https://xinghuo.xfyun.cn')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/xunfei-xinghuo-logo.png" alt=""/>

                <div>
                  <p class="tools-text">讯飞星火</p>
                  <p class="tools-text1">科大讯飞推出的智能助手</p>
                </div>
              </div>

              <div class="tools-card"  @click="openWebPage('https://taichu-web.ia.ac.cn/')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/taichu-ai-icon.png" alt=""/>

                <div>
                  <p class="tools-text">紫东太初</p>
                  <p class="tools-text1">中科院自动化所和武智院推出的多模态大模型</p>
                </div>
              </div>

              <div class="tools-card"  @click="openWebPage('https://tongyi.aliyun.com/qianwen')">

                <img style="margin-left:15px; height: 60px; border-radius: 30px;" src="../assets/icon/tongyi-icon.png" alt=""/>

                <div>
                  <p class="tools-text">通义千问</p>
                  <p class="tools-text1">阿里推出的自研大模型</p>
                </div>
              </div>

              <div class="tools-card"  @click="openWebPage('https://chat.livis.com/chat')">

                <img style="margin-left:15px; height: 60px; border-radius: 30px;" src="../assets/icon/434x0w.webp" alt=""/>

                <div>
                  <p class="tools-text">理想同学</p>
                  <p class="tools-text1">理想汽车依托自研大模型打造的人工智能应用</p>
                </div>
              </div>

            </div>


            <p id="opensourceModel" class="tools-des">开源基座模型（需部署集成）</p>
            <div style="text-align: left; display: flex; flex-wrap: wrap  ">
              <div class="tools-card"  @click="openUtilsPage('/toolsDetails/deepseek')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/deepseek-chat-icon.png" alt=""/>
                <div>
                  <p class="tools-text">DeepSeek</p>
                  <p class="tools-text1">DeepSeek R1/V3/Coder V2/VL</p>
                </div>


              </div>


              <div class="tools-card"  @click="openUtilsPage('/toolsDetails/qwen')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/tongyi-icon.png" alt=""/>
                <div>
                  <p class="tools-text">通义千问</p>
                  <p class="tools-text1">阿里云构建的大型语言模型家族</p>
                </div>


              </div>

              <div class="tools-card"  @click="openUtilsPage('/toolsDetails/zhipu')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/zhipu.png" alt=""/>
                <div>
                  <p class="tools-text">智谱AI</p>
                  <p class="tools-text1">智谱AI系列大模型。</p>
                </div>


              </div>

            </div>


            <p id="devtools" class="tools-des">开发工具套件</p>
            <div style="text-align: left; display: flex; flex-wrap: wrap  ">
              <div class="tools-card"  @click="openUtilsPage('/toolsDetails/mindspore')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/mindespore.svg" alt=""/>
                <div>
                  <p class="tools-text">MindSpore</p>
                  <p class="tools-text1">昇思MindSpore全场景AI框架</p>
                </div>


              </div>
              <div class="tools-card"  @click="openUtilsPage('/toolsDetails/PaddlePaddle')">

                <img style="margin-left:15px; height: 60px" src="../assets/icon/PP.png" alt=""/>
                <div>
                  <p class="tools-text">飞桨PaddlePaddle</p>
                  <p class="tools-text1">源于产业实践的开源深度学习平台</p>
                </div>


              </div>


            </div>
          </el-card>


        </div>











      </div>



    </div>

    <el-backtop :visibility-height="200">
      <div style="height: 100%;
        width: 100%;
        background-color: rgb(245,243,255);
        border-radius: 10px;
        text-align: center;
        line-height: 40px;
        color: #946cff;
        font-family: misans;
        font-size: 14px;
        font-weight: bold;
      "
      >
        返回
      </div>
    </el-backtop>
    <Footer></Footer>

  </div>

</template>

<script>

import pageUtils from "@/utils/pageUtils";
import Footer from "@/components/Footer"
import "../assets/font/font.scss";
import 'animate.css';

import * as Three from 'three';
import vantaFog from "vanta/src/vanta.fog";

export default {

  name: "ToolsHome",
  data(){
    return{
      osredmLogo: require("@/assets/logo/osredm-logo-black-new.png"),

      bingSearchUrl: 'https://cn.bing.com/search?q=' + this.searchInput,
      searchInput : '',
      buttonImgList : [
        require("@/assets/button-assets/tools-button-ns.svg"),
        require("@/assets/button-assets/tools-button-ns.svg"),
        require("@/assets/button-assets/tools-button-ns.svg"),
        require("@/assets/button-assets/tools-button-ns.svg"),
        require("@/assets/button-assets/tools-button-ns.svg"),
        require("@/assets/button-assets/tools-button-ns.svg"),
        require("@/assets/button-assets/tools-button-ns.svg"),
        require("@/assets/button-assets/tools-button-ns.svg"),
        require("@/assets/button-assets/tools-button-ns.svg"),
      ],
    }
  },


  methods:{


    handleSearch() {
      // 构建 Bing 搜索 URL
      const encodedQuery = encodeURIComponent(this.searchInput.trim());
      const bingUrl = `https://www.bing.com/search?q=${encodedQuery}`;

      console.log(this.searchInput)
      console.log(encodedQuery)
      console.log(bingUrl)
      // 跳转到新窗口
      window.open(bingUrl, '_blank');

      // 可选：清空输入框
      this.searchInput = '';
    },






    openUtilsPage(path){
      pageUtils.openPage(this.$router,path)
    },

    openWebPage(url){
      window.location.href=url;

    },

    // 返回红山开源
    backOsredm(){
      window.location.href='https://www.osredm.com';
    },
  },
  components:{
    Footer,

  },

  mounted() {

    this.vantaEffect = vantaFog({
      el: this.$refs.vantaRef,
      THREE: Three
    })
    // 修改颜色时 cells 需要全大写字母 可生效
    vantaFog({
      el: this.$refs.vantaRef,
      mouseControls: true,
      touchControls: true,
      gyroControls: false,
      minHeight: 200.00,
      minWidth: 200.00,
      highlightColor: 0xfff1fb,
      midtoneColor: 0xffdff3,
      lowlightColor: 0xe0e1fc,
      baseColor: 0xd8d3ff,
      blurFactor: 0.57,
      speed: 3.00,
      zoom: 1.40
    });
  }

}
</script>

<style scoped>









.tools-title{

  font-size: 20px;
  font-weight: 500;

  /* 创建线性渐变背景 */
  background-image: linear-gradient(to right, #c459f9, #5961f9);

  /* 将背景裁剪到文字区域 */
  -webkit-background-clip: text;
  background-clip: text;
  /* 隐藏文字的默认填充颜色 */
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;


  text-align: center;
  margin: 0 auto;

  padding: 3px;


  width: 130px;

  border: 1px solid #6816ff;
  border-radius: 10px;
}


.container{


  margin:  0 auto;
  width: 1400px;
  padding-bottom: 18vh;
  display: flex;
  flex-direction: column;
  justify-content: center;    /* 垂直居中 */
  align-items: center;        /* 水平居中 */
}

.tools-card{

  /* 为需要过渡的属性添加过渡效果 */
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
  height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
  border-radius 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
  color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
  margin 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
  box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);



  display: flex;
  flex-direction: row;
  align-items: center;
  width: 288px;
  height: auto;
  border-radius: 15px;
  opacity: 1;
  color: black;
  margin: 30px 20px;
  /*float: left;*/

  cursor: pointer;
  user-select: none;
  draggable: false;
  border: 1px solid rgba(0, 0, 0, 0);

  box-shadow: 0px 4px 10px 0px rgba(118, 147, 204, 0.3);
}

.tools-card:hover{

  /* transform属性 */
  transform:translate(0,-10px);
  border: 1px solid #6816ff;

  height: auto;
  border-radius: 15px;
  color: #4b53ff;
  opacity: 1;
  margin: 30px 20px;
  /*float: left;*/

  cursor: pointer;
  user-select: none;
  draggable: false;
  box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.302);
}




.tools-text {

  font-size: 18px;
  font-weight: 700;
  text-align: left;
  top: 0px;

  margin-left: 10px;
  margin-bottom: 10px;
}


.tools-text1{

  font-size: 14px;
  font-weight: 500;
  width: 150px;
  /*color: #525561;*/
  text-align: left;

  margin-left: 10px;
  margin-top: 10px;
  margin-bottom: 18px;
}

.banner-main{
  position: relative;
  width: 95%;
  height: 350px;


  border-radius: 20px;
}
.banner-img{

  width: 100%;


}

.banner-word{
  position: absolute;
  color: #2d0043;
  font-family: Alibaba;
  font-weight: 500;
  top: 3%;
  left: 0;
  right: 0;
}


.card-border {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 40px;

}

.card-border::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%, transparent, #946cff 14%, transparent 17%);
  animation: buttonBorderSpin 16s linear infinite;
}

.card-border::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)), linear-gradient(135deg, #e5e5ff -1%, #f9eaff 100%);
  border-radius: 15px;
}

@keyframes buttonBorderSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

::v-deep .el-card {
  position: relative;
  z-index: 1;
  border-radius: 15px;
  margin-bottom: 40px;
  border: none;
  background: transparent;
  box-sizing: border-box;
  padding: 20px;
}







a{
  color: #333;
  text-decoration:none;
}

a:link{
  color: #4154F1;
  text-decoration:none;
}

a:hover{
  color: #4154F1;
  text-decoration:none;
}

.search-fm{

  width: 500px;
  height: 40px;
  justify-content: center;
  text-align: center;
  display: flex;
  margin: 0 auto;
  border-radius: 25px;
  border: solid 1px #ddcdff;
  background: rgba(174, 166, 200, 0.11);
}

.search-input{
  width: 100%;
  margin:  0 10px ;
  font-size: 16px;
  font-weight: 550;
  background: transparent;
  border: none;
}

#btn_search{

  top: 0;
  right: 0;
  background: transparent;
  border: 0 !important;
  width: unset;
  height: unset;
  margin: 5px 10px 0 0;

  align-items: center;

  border-radius: 3px;
}

.banner-f{
  font-size: 60px;
  margin-bottom: 30px;
}
/* 二级标题 */
.banner-s{
  font-size: 25px;
}
/* 导航栏 */
.nav-bar{
  width: 1400px;
  height: 70px;
  display: flex;
  text-align: center;
  align-items: center;
  font-weight: 600;
  margin: 0 auto 20px;
}
/* 导航栏LOGO */
.nav-logo{
  margin-left:30px;
  margin-right: 50px;
  width: auto;
  height: 36px;
  cursor: pointer;
}
/* 导航栏首 */
.nav-f{
  margin-left: 20px;
}
/* 导航栏其他按钮 */
.nav-s{
  margin-left: 60px;
}

/* 主卡片 */
.main-card{
  width: 1400px;
  margin: 0 auto 0;
}

/* 工具描述 */
.tools-des{

  font-size: 16px;

  font-family: misans;
  font-weight: bold;
  margin: 30px 0 auto;


  /* 创建线性渐变背景 */
  background-image: linear-gradient(to right, #5800c3, #f80000);

  /* 将背景裁剪到文字区域 */
  -webkit-background-clip: text;
  background-clip: text;
  /* 隐藏文字的默认填充颜色 */
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;

}


/* 快速跳转按钮样式 */
.button-jump{
  font-size: 13px;
  font-weight: bold;
  font-family: misans;
  background: rgba(174, 166, 200, 0.11);
  padding: 6px 10px;

  border-color: #946cff;

  /* 创建线性渐变背景 */
  background-image: linear-gradient(to right, #c459f9, #5961f9);

  /* 将背景裁剪到文字区域 */
  -webkit-background-clip: text;
  background-clip: text;
  /* 隐藏文字的默认填充颜色 */
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}

.div-jump{
  margin-bottom: 20px;
}

/* 移动端适配 */
@media screen and (max-width: 425px) {

  .container{
    max-width: 1024px;
    min-width: 400px;
    margin:  0 auto;
    width: 400px;
    padding-bottom: 1vh;
    display: flex;
    flex-direction: column;
    justify-content: center;    /* 垂直居中 */
    align-items: center;        /* 水平居中 */
  }


  .banner-main{
    position: relative;
    width: 95%;
    height: 250px;


    border-radius: 20px;
  }

  /* 一级标题 */
  .banner-f{
    font-size: 40px;
  }
  /* 二级标题 */
  .banner-s{
    font-size: 20px;
  }



  /* 搜索 */
  .search-fm{

    width: 320px;
    height: 30px;
    justify-content: center;
    text-align: center;
    display: flex;
    margin: 0 auto;
    border-radius: 25px;
    border: solid 1px #ddcdff;
    background: rgba(174, 166, 200, 0.11);
  }

  .search-input{
    width: 100%;
    margin:  0 10px ;
    font-size: 14px;
    font-weight: 550;
    background: transparent;
    border: none;
  }

  #btn_search{

    top: 0;
    right: 0;
    background: transparent;
    border: 0 !important;
    width: unset;
    height: unset;
    margin: 1px 3px 0 0;

    align-items: center;

    border-radius: 3px;
  }




  /* 导航栏 */
  .nav-bar{
    max-width: 1024px;
    min-width: 400px;

    width: 400px;
    height: 70px;
    display: flex;
    text-align: center;
    align-items: center;
    font-weight: 600;
    margin: 0 auto 20px;
  }




  /* 导航栏LOGO */
  .nav-logo{
    margin-left:20px;
    margin-right: 20px;
    width: auto;
    height: 22px;
    cursor: pointer;
  }
  /* 导航栏首 */
  .nav-f{
    margin-left: 0px;
    font-size: 10px;
  }
  /* 导航栏其他按钮 */
  .nav-s{
    margin-left: 20px;
    font-size: 10px;
  }


  /* 主卡片 */
  .main-card{
    width: 380px;
    margin: 0 auto 0;
  }

}


</style>
